﻿using Abp.Application.Navigation;
using Abp.Localization;
using FwProject.Authorization;

namespace FwProject.Web.Startup
{
    /// <summary>
    /// This class defines menus for the application.
    /// </summary>
    public class FwProjectNavigationProvider : NavigationProvider
    {
        public override void SetNavigation(INavigationProviderContext context)
        {
            context.Manager.Menus.Add("ShopMenu", new MenuDefinition("ShopMenu", L("商城菜单"), null).AddItem(
                    new MenuItemDefinition(
                        "Commodity",
                        L("商品"),
                        icon: "&#xe74e;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "CommodityManagement",
                        L("商品管理"),
                        icon: "&#xe656;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "CommodityList",
                        L("商品列表"),
                        url: "/Commodity/CommodityIndex",
                        icon: "&#xe60a;",
                        requiresAuthentication: true
                    )
                   ).AddItem(
                    new MenuItemDefinition(
                        "AddingGoods",
                        L("添加商品"),
                        url: "/Commodity/SelectType",
                        icon: "&#xe654;",
                        requiresAuthentication: true
                    )
                    )).AddItem(
                    new MenuItemDefinition(
                        "ProductSettings",
                        L("商品属性设置"),
                        url: "/Home/Note",
                        icon: "&#xe716;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "CategoryList",
                        L("分类列表"),
                        url: "/ShopType/Index",
                        icon: "&#xe60a;",
                        requiresAuthentication: true
                    )
                    ).AddItem(
                    new MenuItemDefinition(
                        "BrandList",
                        L("品牌列表"),
                        url: "/Brands/Index",
                        icon: "&#xe60a;",
                        requiresAuthentication: true
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "TypeList",
                        L("类型列表"),
                        url: "/Genre/Index",
                        icon: "&#xe60a;",
                        requiresAuthentication: true
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "SpecificationList",
                        L("规格列表"),
                        url: "/Spce/Index",
                        icon: "&#xe60a;",
                        requiresAuthentication: true
                    )
                )
                ).AddItem(
                    new MenuItemDefinition(
                        "ProductReviews",
                        L("商品评论"),
                        icon: "&#xe611;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "ProductReviewsList",
                        L("商品评论列表"),
                        url: "/Reviews/Index",
                        icon: "&#xe60a;",
                        requiresAuthentication: true
                    )
                )
                ).AddItem(
                    new MenuItemDefinition(
                        "LabelManagement",
                        L("标签管理"),
                        icon: "&#xe63c;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "TagList",
                        L("标签列表"),
                        url: "/Tag/Index",
                        icon: "&#xe60a;",
                        requiresAuthentication: true
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "LabelProductSettings",
                        L("标签商品设置"),
                        url: "/Tag/TagShopSet",
                        icon: "&#xe716;",
                        requiresAuthentication: true
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "LabelBrandingSettings",
                        L("标签品牌设置"),
                        url: "/Home/Note",
                        icon: "&#xe716;",
                        requiresAuthentication: true
                    )
                )
                )
                ).AddItem(
                    new MenuItemDefinition(
                        "Orders",
                        L("App订单"),
                        icon: "&#xe620;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "OrdersManagement",
                        L("订单管理"),
                        icon: "&#xe656;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "OrdersList",
                            L("订单列表"),
                            url: "/Order/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    ).AddItem(
                        new MenuItemDefinition(
                            "StayBalance",
                            L("待结算订单"),
                            url: "/Order/Index?type=SettleAccounts",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    ).AddItem(
                        new MenuItemDefinition(
                            "StayDeliver",
                            L("待发货订单"),
                            url: "/Order/ShipIndex",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    ).AddItem(
                        new MenuItemDefinition(
                            "StayCollect",
                            L("待收货订单"),
                            url: "/Order/Index?type=Receipt",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    )
                    ).AddItem(
                        new MenuItemDefinition(
                    "OrdersApply",
                    L("订单退货"),
                    icon: "&#xe609;",
                    requiresAuthentication: true
                ).AddItem(
                    new MenuItemDefinition(
                        "ReturnApply",
                        L("退货申请"),
                        url: "/Home/Note",
                        icon: "&#xe609;",
                        requiresAuthentication: true
                    )
                )
                )
                ).AddItem(
                    new MenuItemDefinition(
                        "Promotion",
                        L("App活动促销"),
                        url: "/Home/Note",
                        icon: "&#xe741;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "ActivityManagement",
                        L("促销活动管理"),
                        icon: "&#xe60a;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "ActivityList",
                            L("秒杀活动列表"),
                            url: "/Promotions/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    )
                    )
                    .AddItem(
                    new MenuItemDefinition(
                        "CouponManagement",
                        L("优惠券管理"),
                        icon: "&#xe61f;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "CouponList",
                            L("优惠券列表"),
                            url: "/Coupon/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    )
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "Advertising",
                        L("App营销"),
                        icon: "&#xe6ea;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "AdvertisingManagement",
                        L("广告管理"),
                        icon: "&#xe656;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "AdvertisingSpace",
                            L("广告位"),
                            url: "/Advertising/Space",
                            icon: "&#xe632;",
                            requiresAuthentication: true
                        )
                    ).AddItem(
                        new MenuItemDefinition(
                            "AdvertisingList",
                            L("广告列表"),
                            url: "/Advertising/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    )
                    ).AddItem(
                    new MenuItemDefinition(
                        "KeywordSetup",
                        L("App关键字设置"),
                        icon: "&#xe716;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "HotKeyword",
                            L("热门关键字"),
                            url: "/Keyword/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "ContentManage",
                        L("内容管理"),
                        icon: "&#xe705;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "ContentType",
                            L("内容分类"),
                            url: "/ContentManage/ContentType",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    ).AddItem(
                        new MenuItemDefinition(
                            "ContentList",
                            L("内容列表"),
                            url: "/ContentManage/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "NoticeManage",
                        L("App公告管理"),
                        icon: "&#xe63c;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "NoticeList",
                            L("公告列表"),
                            url:"/Notice/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    )
                )
                ).AddItem(
                    new MenuItemDefinition(
                        "Supplier",
                        L("供应商/结算"),
                        icon: "&#xe60e;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "SupplierManagement",
                        L("供应商管理"),
                        icon: "&#xe656;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "SupplierList",
                            L("供应商列表"),
                            url: "/Supplier/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    ).AddItem(
                        new MenuItemDefinition(
                            "SupplierOrders",
                            L("供应商订单"),
                            url: "/Supplier/Orders",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    ).AddItem(
                        new MenuItemDefinition(
                            "SupplierSettlement",
                            L("平台结算单"),
                            url: "/Settlement/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    )
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "Feedback",
                        L("意见反馈"),
                        icon: "&#xe521;",
                        requiresAuthentication: true
                    ).AddItem(
                    new MenuItemDefinition(
                        "FeedbackList",
                        L("意见反馈列表"),
                        url: "/Feedback/Index",
                        icon: "&#xe60a;",
                        requiresAuthentication: true
                    )
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "SysConfig",
                        L("系统设置"),
                        icon: "&#xe72d;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "RegionConfig",
                            L("地区管理"),
                            url: "/Region/Index",
                            icon: "&#xe670;",
                            requiresAuthentication: true
                        )
                    )
                ).AddItem(
                    new MenuItemDefinition(
                        "RolesPower",
                        L("角色权限"),
                        icon: "&#xe614;",
                        requiresAuthentication: true
                    ).AddItem(
                        new MenuItemDefinition(
                            "RolesList",
                            L("角色列表"),
                            url: "/Roles/Index",
                            icon: "&#xe60a;",
                            requiresAuthentication: true
                        )
                    )
                )
                );
        }

        private static ILocalizableString L(string name)
        {
            return new LocalizableString(name, FwProjectConsts.LocalizationSourceName);
        }
    }
}
